package com.hyt.it.ogt.ykcj.common.enums;

/**
 * 考试类型枚举
 *
 * @author admin
 */
public enum ExamTypeEnums {
  EXPERTISE("0", "专业技术类考试"),
  SERVANT("1", "公务员考试"),
  ENTERPRISE("2", "企业招聘考试"),
  OTHER("99", "其他考试"),
  ALL("all", "全部"),
  UNKNOWN("unkonw", "未知"),;
  private String code;
  private String desc;

  ExamTypeEnums(String code, String desc) {
    this.code = code;
    this.desc = desc;
  }

  public static ExamTypeEnums getAnalysisByCode(String code) {
    for (ExamTypeEnums analysisType : ExamTypeEnums.values()) {
      if (analysisType.getCode().equals(code)) {
        return analysisType;
      }
    }
    return ExamTypeEnums.UNKNOWN;
  }

  public String getCode() {
    return code;
  }


  public String getDesc() {
    return desc;
  }
}
